import { praiseApi, pullApi } from '../../../../../utils/api';

const getPraiseData = (praiseList) => {
  return {
    type: "praise",
    praiseList,
  }
}

export const getPraiseDataAsync = () => {
  return async (dispatch) => {
    const res = await praiseApi();
    dispatch(getPraiseData(res.data.result));
  }
}

const getPullData = (pullList) => {
  return {
    type: "pull",
    pullList,
  }
}


export const getPullDataAsync = () => {
  return async (dispatch) => {
    const res = await pullApi();
    console.log(res);
    dispatch(getPullData(res.data.result));
  }
}